package com.wzh.apiinterface.controller;

import com.wzh.apiclientsdk.model.User;
import com.wzh.apiclientsdk.utils.SignUtils;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author wzh
 * @create 2023/4/5 20:20
 * @Description: 查询名称api
 */
@RestController
@RequestMapping("/name")
public class NameController {

    @GetMapping("/get")
    public String getNameByGet(String name){
        return "Get+你的名字是"+name;
    }

    @PostMapping("/post")
    public String getNameByPost(@RequestParam String name){
        return "Post+你的名字是"+name;
    }


    @PostMapping("/user")
    public String getUsernameByPost(@RequestBody User user, HttpServletRequest request){
        return "Post+你的名字是"+user.getName();
    }

}
